﻿<%@ Control Language="C#" %>
<script runat="server">
    public int Conut = 1;
    private int cid = 0;
    private Boolean isShowHd = true;
    private Boolean isShowSmaillPic = false;
    private int interTime = 2500;
    private string effect = "leftLoop";
    private string className = "touchSlide";

    /* 数据绑定 */
    protected void Page_Load(object sender, EventArgs e)
    {
        int Item_Lang = Utils.GetQueryString("lang", 1);
        Advertisement Ad = new Advertisement();
        Repeater_List.DataSource = Ad.Advertisement_List(Item_Lang, cid);
        Repeater_List.DataBind();

    }
    /// <summary>
    /// 广告栏目的ID
    /// </summary>
    public int Cid
    {
        get { return cid; }
        set { cid = value; }
    }
    /// <summary>
    /// 切换效果  left：左滚动； leftLoop：左循环滚动；
    /// </summary>
    public string Effect
    {
        get { return effect; }
        set { effect = value; }
    }
    /// <summary>
    /// 毫秒；自动运行间隔（隔多少毫秒后执行下一个效果）
    /// 默认值2500毫秒
    /// </summary>
    public int InterTime
    {
        get { return interTime; }
        set { interTime = value; }
    }
    /// <summary>
    /// 容器对象（执行效果的对象，生成HTML的时候这个值作为容器ID）
    /// 默认值 "touchSlide"
    /// </summary>
    public string ClassName
    {
        get { return className; }
        set { className = value; }
    }

</script>
<div class="slider_<%=Cid %> slider" id="<%=ClassName %>">
    <div class="bd">
        <ul>
            <asp:Repeater runat="server" ID="Repeater_List">
                <ItemTemplate>
                    <li><a href="<%#Eval("Item_Url")%>" style=" background-image:url(../DataFile/Ad/<%#Eval("Create_Time","{0:yyyyMM}") %>/<%#Eval("Create_Time","{0:ddHHmmss}") %>.jpg)"></a></li>
                </ItemTemplate>
            </asp:Repeater>
        </ul>
    </div>
     <div class="hd">
        <ul>
        </ul>
    </div>
     <!-- 激活JAVASCRIPT -->
    <script type="text/javascript">
        TouchSlide({
            slideCell: "#<%=ClassName%>",
            titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
            mainCell: ".bd ul",
            interTime:<%=InterTime%>,
            effect:"<%=Effect%>",
            autoPlay:true,//自动播放
            autoPage:true, //自动分页
        });
    </script>
</div>

